<?php

use yii\helpers\Url;

$tab_list = [
    'index' => [
        'title' => '中介列表',
        'url'   => '/admin/mediation/index',
    ],
    'set'   => [
        'title' => '邀请中介',
        'url'   => '/admin/mediation/set',
    ],

];

?>
<?php if (Yii::$app->admin->identity->id == 1): ?>
    <?php unset($tab_list['set']) ?>
<?php endif; ?>
<div class=" ui inverted segment">
    <div class=" ui inverted secondary pointing menu">
        <?php foreach ($tab_list as $key => $item): ?>
            <a class="item <?php if ($tab == $key): ?>active<?php endif; ?> "
               href="<?= Url::to([$item['url']]) ?>"><?= $item['title'] ?> </a>
        <?php endforeach; ?>
    </div>
</div>
